//index.js  
//获取应用实例  
var app = getApp()
let util;
Page({
  data: {
    // tab切换  
    currentTab: 2,
  },

  onLoad: function (options) {
    util = getApp().require('/utils/util.js')
    this.setData({
      currentTab: 0
    })
  },

  bindChange: function (e) {
    var that = this;
    that.setData({
      currentTab: e.detail.current
    });
  },


  swichNav: function (e) {
    if (this.data.currentTab === e.target.dataset.current) {
      return false;
    } else {
      this.setData({
        currentTab: e.target.dataset.current
      })
    }
  },




})